package pers.vic.blog.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Vic.xu
 * @description: 读取配置文件的属性作为静态属性
 * @date: 2020/7/7 0007 14:01
 */
@Component
public class PropertiesParams {

    /**
     * 附件前缀    附件访问地址：相对于项目; 附件地址 = attachment.visit + /attachment//visit/{id}
     */
    public static String ATTACHMENT_PREFIX;

    @Value("${attachment.server}")
    public void setAttachmentPrefix(String attachmentPrefix){
        PropertiesParams.ATTACHMENT_PREFIX = attachmentPrefix;
    }



}
